function [ A ] = sid1( A, color, t )
%UNTITLED Summary of this function goes here
%   Detailed explanation goes here
    
    if exist([pwd,'/players/sid1'],'dir')
        display([pwd,'/players/sid1'])
        addpath(genpath([pwd,'/players/sid1']));
    end
    
    
    persistent startgame_depth;     startgame_depth = 2;
    persistent middlegame_depth;    middlegame_depth = 5;
    persistent endgame_depth;       endgame_depth = 12;
    
    
    % if time left < 100 seconds reduce middlegame_depth to 4
    if t<100
        middlegame_depth = 4;
    end
    
    % test in which part of the game we are
    moves_left = length(find(A==0));
    
    
    % we are at the middle of the game
    if (moves_left < 52) && (moves_left > endgame_depth)
        [weight, A] = negaMAX(A, middlegame_depth, color, -inf, inf, 0);
        return;
    end
        
    
    % we are at the end of the game
    % evaluate stones only
    if moves_left < endgame_depth
        if t<30
            [weight, A] = negaMAX(A, endgame_depth-3, color, -inf, inf, 1);
        else
            [weight, A] = negaMAX(A, endgame_depth, color, -inf, inf, 1);
        end
        return;
    end
     
    
    % we are at the beginning of the game
        [weight, A] = negaMAX(A, startgame_depth, color, -inf, inf, 0);

    
end

